package com.neoCalf.neoFriend.feigns;


import com.neoCalf.neoCommon.entity.ChatMessage;
import com.neoCalf.neoCommon.entity.ChatSession;
import com.neoCalf.neoCommon.entity.Session;
import com.neoCalf.neoCommon.model.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.constraints.NotNull;
import java.util.List;

@FeignClient(value = "chatService", path = "/api")
public interface ChatServiceFeign {
    @PostMapping("/chat/addSession")
    R<String> addSession(@RequestBody Session session);

    @PostMapping("/chat/addChatSession")
    R<String> addChatSession(@RequestBody ChatSession chatSession);

    @PostMapping("/chat/addChatMessage")
    R<String> addChatMessage(@RequestBody ChatMessage chatMessage);

    @PostMapping("/chat/addChatMessageList")
    R<String> addChatMessageList(@RequestBody List<ChatMessage> chatMessageList);

    @PostMapping("/chat/delContactSession")
    R<String> delContactSession(@RequestParam("sessionId") String sessionId);

    @PostMapping("/chat/updateChatSession")
    R<String> updateChatSession(@RequestBody ChatSession chatSession);

    @PostMapping("/chat/addSessionList")
    R<String> addSessionList(@RequestBody List<Session> sessionList);

    @PostMapping("/chat/delGroupSessionBatch")
    R<String> delGroupSessionBatch(@RequestParam("list") String[] list, @RequestParam("groupId") String groupId);
}
